package com.seckill.pojo.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 秒杀优惠券
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SeckillCoupon implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    //优惠券名称
    private String name;

    //优惠券类型 1:满减券 2:折扣券 3:代金券
    private Integer type;

    //优惠券价格
    private BigDecimal price;
    //优惠券面值
    private BigDecimal value;

    //使用门槛，满多少可用
    private BigDecimal condition;

    //优惠券描述
    private String description;

    //所属活动id
    private Long activityId;

    //库存
    private Integer stock;

    //已领取数量
    private Integer takeCount;

    //每人限领数量
    private Integer limitCount;

    //有效期开始时间
    private LocalDateTime validStartTime;

    //有效期结束时间
    private LocalDateTime validEndTime;

    //创建时间
    private LocalDateTime createTime;

    //更新时间
    private LocalDateTime updateTime;

    //创建人
    private Long createUser;

    //修改人
    private Long updateUser;
}